<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 15-6-23
 * Time: 上午10:50
 */

class pa_fileView{
    public function execute(){

        global $G_PGLOB;

        if(isset($_REQUEST['filePath']) && $_REQUEST['filePath'] != ''){

            $file_path = G_APPLICATION_BASEPATH.$_REQUEST['filePath'];

            if(is_file($file_path)){

                $filemtime = filemtime($file_path);

                $G_PGLOB->smarty->assign('filemtime',date('Y-m-d H:i:s',$filemtime));

            }else{

                $G_PGLOB->smarty->assign('filemtime','文件不存在！');
                
            }

            $G_PGLOB->smarty->assign('filePath',$_REQUEST['filePath']);

        }else{
            $G_PGLOB->smarty->assign('filePath','');
        }

        $G_PGLOB->smarty->display('project/fileView.tpl');

    }
}